<template>
    <el-card class="box-card">
        <el-form :model="TxnLogsForm" :inline="true">
            <el-form-item>
                <el-input placeholder="订单号" v-model="TxnLogsForm.order_code"></el-input>
            </el-form-item>
            <el-form-item>
                <el-input placeholder="产品名" v-model="TxnLogsForm.product_name"></el-input>
            </el-form-item>
            <el-form-item>
                <el-input placeholder="小b" v-model="TxnLogsForm.retailer_user"></el-input>
            </el-form-item>
            <el-form-item>
                <el-input placeholder="大B" v-model="TxnLogsForm.dealer_uesr"></el-input>
            </el-form-item>
            <el-form-item>
                <el-input placeholder="城市名" v-model="TxnLogsForm.city_name"></el-input>
            </el-form-item>
            <el-form-item>
                <el-input placeholder="下单时间从：yyyy-mm-dd" v-model="TxnLogsForm.buy_gteq"></el-input>
            </el-form-item>
            <el-form-item>
                <el-input placeholder="下单时间到：yyyy-mm-dd" v-model="TxnLogsForm.buy_lteq"></el-input>
            </el-form-item>
            <el-form-item>
                <el-input placeholder="清算时间从：yyyy-mm-dd" v-model="TxnLogsForm.settled_gteq"></el-input>
            </el-form-item>
            <el-form-item>
                <el-input placeholder="清算时间到：yyyy-mm-dd" v-model="TxnLogsForm.settled_lteq"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button>查询</el-button>
                <el-button>导出</el-button>
            </el-form-item>
        </el-form>
        <el-table :data="TxnLogsData" border>
            <el-table-column prop="number" label="序号" width="70"></el-table-column>
            <el-table-column label="订单号" align="center" width="165">
                <template scope="scope">
                    <a @click="goOrderDetail" style="cursor: pointer">{{scope.row.order_code}}</a>
                </template>
            </el-table-column>
            <el-table-column prop="product_name" show-overflow-tooltip=true align="center" width="140" label="产品名"></el-table-column>
            <el-table-column prop="product_unit" label="单位" width="70"></el-table-column>
            <el-table-column prop="product_price" label="单价"></el-table-column>
            <el-table-column prop="product_number" label="数量<br/>合计"></el-table-column>
            <el-table-column prop="total_price" label="金额<br/>合计"></el-table-column>
            <el-table-column prop="yibao_charge" label="易宝手续费<br/>合计"></el-table-column>
            <el-table-column prop="pingtai_charge" label="平台手续费<br/>合计"></el-table-column>
            <el-table-column prop="retailer_user" label="小b" show-overflow-tooltip=true></el-table-column>
            <el-table-column prop="dealer_uesr" label="大B" show-overflow-tooltip=true></el-table-column>
            <el-table-column prop="city_name" label="城市名" show-overflow-tooltip=true></el-table-column>
            <el-table-column prop="buy_time" width="140" align="center" label="下单时间" show-overflow-tooltip=true></el-table-column>
        </el-table>
        <!--分页-->
        <el-col :span="24" class="toolPage">
            <el-pagination :current-page="page.current" :page-sizes="[10, 20, 50, 100]" :page-size="page.size" layout="total, sizes, prev, pager, next, jumper"
                :total="page.total" style="float:right" @size-change="handleSizeChange" @current-change="handlePageChange">
                </el-pagination>
        </el-col>
    </el-card>
</template>
<script>
    export default {
        data() {
            return {
                TxnLogsForm: {
                    order_code: '',
                    product_name: '',
                    retailer_user: '',
                    dealer_uesr: '',
                    city_name: '',
                    buy_gteq: '',
                    buy_lteq: '',
                    settled_gteq: '',
                    settled_lteq: ''
                },
                TxnLogsData: [{
                    total: '111234',
                    number: '1',
                    order_code: '2001702237050002',
                    product_name: '华蒙通红富士',
                    product_unit: '公斤',
                    product_price: '2.3',
                    product_number: '2',
                    total_price: '233',
                    yibao_charge: '2',
                    pingtai_charge: '2',
                    retailer_user: 'sumin水果店',
                    dealer_uesr: '田园批发商一部',
                    city_name: '上海市',
                    buy_time: '2017年2月23日 13:59'
                }],
                page: {
                    total: 0,
                    current: 1,
                    size: 10,
                },
            }
        },
        methods: {
            goOrderDetail() {
                this.$router.push(`orders`);
            },
            handleSizeChange(size) {
                this.page.size = size
                // this.loadGridData()
            },
            handlePageChange(current) {
                this.page.current = current
                // this.loadGridData()
            },
        }
    }

</script>